3.9.32 \(\int \frac {\tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx\) [832]

3.9.32.1 Optimal result
3.9.32.2 Mathematica [A] (verified)
3.9.32.3 Rubi [A] (verified)
3.9.32.4 Maple [A] (verified)
3.9.32.5 Fricas [A] (verification not implemented)
3.9.32.6 Sympy [F(-1)]
3.9.32.7 Maxima [B] (verification not implemented)
3.9.32.8 Giac [A] (verification not implemented)
3.9.32.9 Mupad [B] (verification not implemented)

3.9.32.1 Optimal result

Integrand size = 21, antiderivative size = 91 \[ \int \frac {\tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {2 \sec ^3(c+d x)}{3 a^2 d}+\frac {4 \sec ^5(c+d x)}{5 a^2 d}-\frac {2 \sec ^7(c+d x)}{7 a^2 d}+\frac {\tan ^5(c+d x)}{5 a^2 d}+\frac {2 \tan ^7(c+d x)}{7 a^2 d} \]

output
-2/3*sec(d*x+c)^3/a^2/d+4/5*sec(d*x+c)^5/a^2/d-2/7*sec(d*x+c)^7/a^2/d+1/5* 
tan(d*x+c)^5/a^2/d+2/7*tan(d*x+c)^7/a^2/d
 
3.9.32.2 Mathematica [A] (verified)

Time = 0.52 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.38 \[ \int \frac {\tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\sec ^3(c+d x) (672-1442 \cos (c+d x)+1664 \cos (2 (c+d x))-309 \cos (3 (c+d x))-288 \cos (4 (c+d x))+103 \cos (5 (c+d x))-1232 \sin (c+d x)-824 \sin (2 (c+d x))+1896 \sin (3 (c+d x))-412 \sin (4 (c+d x))-72 \sin (5 (c+d x)))}{13440 a^2 d (1+\sin (c+d x))^2} \]

input
Integrate[Tan[c + d*x]^4/(a + a*Sin[c + d*x])^2,x]
 
output
-1/13440*(Sec[c + d*x]^3*(672 - 1442*Cos[c + d*x] + 1664*Cos[2*(c + d*x)] 
- 309*Cos[3*(c + d*x)] - 288*Cos[4*(c + d*x)] + 103*Cos[5*(c + d*x)] - 123 
2*Sin[c + d*x] - 824*Sin[2*(c + d*x)] + 1896*Sin[3*(c + d*x)] - 412*Sin[4* 
(c + d*x)] - 72*Sin[5*(c + d*x)]))/(a^2*d*(1 + Sin[c + d*x])^2)
 
3.9.32.3 Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.04, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3190, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tan ^4(c+d x)}{(a \sin (c+d x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\tan (c+d x)^4}{(a \sin (c+d x)+a)^2}dx\)

\(\Big \downarrow \) 3190

\(\displaystyle \frac {\int \left (a^2 \sec ^2(c+d x) \tan ^6(c+d x)-2 a^2 \sec ^3(c+d x) \tan ^5(c+d x)+a^2 \sec ^4(c+d x) \tan ^4(c+d x)\right )dx}{a^4}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {2 a^2 \tan ^7(c+d x)}{7 d}+\frac {a^2 \tan ^5(c+d x)}{5 d}-\frac {2 a^2 \sec ^7(c+d x)}{7 d}+\frac {4 a^2 \sec ^5(c+d x)}{5 d}-\frac {2 a^2 \sec ^3(c+d x)}{3 d}}{a^4}\)

input
Int[Tan[c + d*x]^4/(a + a*Sin[c + d*x])^2,x]
 
output
((-2*a^2*Sec[c + d*x]^3)/(3*d) + (4*a^2*Sec[c + d*x]^5)/(5*d) - (2*a^2*Sec 
[c + d*x]^7)/(7*d) + (a^2*Tan[c + d*x]^5)/(5*d) + (2*a^2*Tan[c + d*x]^7)/( 
7*d))/a^4
 

3.9.32.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3190
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x 
_)])^(p_.), x_Symbol] :> Simp[a^(2*m)   Int[ExpandIntegrand[(g*Tan[e + f*x] 
)^p/Sec[e + f*x]^m, (a*Sec[e + f*x] - b*Tan[e + f*x])^(-m), x], x], x] /; F 
reeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]
 
3.9.32.4 Maple [A] (verified)

Time = 0.46 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.20

method result size
parallelrisch \(\frac {32 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )+4 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-14 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-21\right )}{105 d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}\) \(109\)
risch \(-\frac {2 i \left (140 i {\mathrm e}^{7 i \left (d x +c \right )}+105 \,{\mathrm e}^{8 i \left (d x +c \right )}+84 i {\mathrm e}^{5 i \left (d x +c \right )}-140 \,{\mathrm e}^{6 i \left (d x +c \right )}+68 i {\mathrm e}^{3 i \left (d x +c \right )}+14 \,{\mathrm e}^{4 i \left (d x +c \right )}-36 i {\mathrm e}^{i \left (d x +c \right )}-132 \,{\mathrm e}^{2 i \left (d x +c \right )}+9\right )}{105 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} d \,a^{2}}\) \(132\)
norman \(\frac {-\frac {32 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d a}+\frac {32}{105 a d}+\frac {128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{105 d a}+\frac {32 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 d a}-\frac {256 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{105 d a}-\frac {64 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}\) \(133\)
derivativedivides \(\frac {-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {32}{256 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-256}-\frac {4}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {12}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d \,a^{2}}\) \(160\)
default \(\frac {-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {32}{256 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-256}-\frac {4}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {12}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d \,a^{2}}\) \(160\)

input
int(sec(d*x+c)^4*sin(d*x+c)^4/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
32/105*tan(1/2*d*x+1/2*c)^5*(tan(1/2*d*x+1/2*c)^5+4*tan(1/2*d*x+1/2*c)^4+3 
*tan(1/2*d*x+1/2*c)^3-8*tan(1/2*d*x+1/2*c)^2-14*tan(1/2*d*x+1/2*c)-21)/d/a 
^2/(tan(1/2*d*x+1/2*c)-1)^3/(tan(1/2*d*x+1/2*c)+1)^7
 
3.9.32.5 Fricas [A] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.13 \[ \int \frac {\tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {18 \, \cos \left (d x + c\right )^{4} - 44 \, \cos \left (d x + c\right )^{2} + {\left (9 \, \cos \left (d x + c\right )^{4} - 66 \, \cos \left (d x + c\right )^{2} + 25\right )} \sin \left (d x + c\right ) + 10}{105 \, {\left (a^{2} d \cos \left (d x + c\right )^{5} - 2 \, a^{2} d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 2 \, a^{2} d \cos \left (d x + c\right )^{3}\right )}} \]

input
integrate(sec(d*x+c)^4*sin(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="frica 
s")
 
output
-1/105*(18*cos(d*x + c)^4 - 44*cos(d*x + c)^2 + (9*cos(d*x + c)^4 - 66*cos 
(d*x + c)^2 + 25)*sin(d*x + c) + 10)/(a^2*d*cos(d*x + c)^5 - 2*a^2*d*cos(d 
*x + c)^3*sin(d*x + c) - 2*a^2*d*cos(d*x + c)^3)
 
3.9.32.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\text {Timed out} \]

input
integrate(sec(d*x+c)**4*sin(d*x+c)**4/(a+a*sin(d*x+c))**2,x)
 
output
Timed out
 
3.9.32.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 316 vs. \(2 (81) = 162\).

Time = 0.23 (sec) , antiderivative size = 316, normalized size of antiderivative = 3.47 \[ \int \frac {\tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {32 \, {\left (\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {8 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + 1\right )}}{105 \, {\left (a^{2} + \frac {4 \, a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {8 \, a^{2} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {14 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {8 \, a^{2} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {3 \, a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {a^{2} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}}\right )} d} \]

input
integrate(sec(d*x+c)^4*sin(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="maxim 
a")
 
output
-32/105*(4*sin(d*x + c)/(cos(d*x + c) + 1) + 3*sin(d*x + c)^2/(cos(d*x + c 
) + 1)^2 - 8*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 14*sin(d*x + c)^4/(cos( 
d*x + c) + 1)^4 - 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 1)/((a^2 + 4*a^ 
2*sin(d*x + c)/(cos(d*x + c) + 1) + 3*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1 
)^2 - 8*a^2*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 14*a^2*sin(d*x + c)^4/(c 
os(d*x + c) + 1)^4 + 14*a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 8*a^2*si 
n(d*x + c)^7/(cos(d*x + c) + 1)^7 - 3*a^2*sin(d*x + c)^8/(cos(d*x + c) + 1 
)^8 - 4*a^2*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - a^2*sin(d*x + c)^10/(cos 
(d*x + c) + 1)^10)*d)
 
3.9.32.8 Giac [A] (verification not implemented)

Time = 0.36 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.60 \[ \int \frac {\tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\frac {35 \, {\left (3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} - \frac {105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 735 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2030 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2030 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1701 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 707 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 116}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{840 \, d} \]

input
integrate(sec(d*x+c)^4*sin(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="giac" 
)
 
output
1/840*(35*(3*tan(1/2*d*x + 1/2*c)^2 - 9*tan(1/2*d*x + 1/2*c) + 4)/(a^2*(ta 
n(1/2*d*x + 1/2*c) - 1)^3) - (105*tan(1/2*d*x + 1/2*c)^6 + 735*tan(1/2*d*x 
 + 1/2*c)^5 + 2030*tan(1/2*d*x + 1/2*c)^4 + 2030*tan(1/2*d*x + 1/2*c)^3 + 
1701*tan(1/2*d*x + 1/2*c)^2 + 707*tan(1/2*d*x + 1/2*c) + 116)/(a^2*(tan(1/ 
2*d*x + 1/2*c) + 1)^7))/d
 
3.9.32.9 Mupad [B] (verification not implemented)

Time = 13.95 (sec) , antiderivative size = 184, normalized size of antiderivative = 2.02 \[ \int \frac {\tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{105}+\frac {128\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{105}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{35}-\frac {256\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{105}-\frac {64\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{15}-\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{5}}{a^2\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7} \]

input
int(sin(c + d*x)^4/(cos(c + d*x)^4*(a + a*sin(c + d*x))^2),x)
 
output
-((32*cos(c/2 + (d*x)/2)^10)/105 + (128*cos(c/2 + (d*x)/2)^9*sin(c/2 + (d* 
x)/2))/105 - (32*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x)/2)^5)/5 - (64*cos(c/ 
2 + (d*x)/2)^6*sin(c/2 + (d*x)/2)^4)/15 - (256*cos(c/2 + (d*x)/2)^7*sin(c/ 
2 + (d*x)/2)^3)/105 + (32*cos(c/2 + (d*x)/2)^8*sin(c/2 + (d*x)/2)^2)/35)/( 
a^2*d*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2))^3*(cos(c/2 + (d*x)/2) + si 
n(c/2 + (d*x)/2))^7)